
use "D:\Dropbox\Work - RA\D02 - REV and MOM relationship\A01_Panel_data_WITH_US.dta", replace
cd "D:\Dropbox\Work - RA\! (2025.03.03) Final replication code for RFS"
gen con=1


* REV is multiplied by -1 (sign flip) so that it becomes profit.;
replace rev=rev*(-1)

replace mktvol_mkt_dret=mktvol_ewret if missing(mktvol_mkt_dret)


* First, re-run Table 4 while controlling for market liquidity and volatility
keep if year>=1991

eststo clear

	eststo: reghdfe rev mom, absorb(year#month) vce(cl year#month)
	eststo: reghdfe rev mom, absorb(con) vce(cl year#month)
	eststo: reghdfe rev mom amihud_m_cls_prc mktvol_mkt_dret, absorb(year#month) vce(cl year#month)
	eststo: reghdfe rev mom amihud_m_cls_prc mktvol_mkt_dret, absorb(con) vce(cl year#month)

estfe *, labels(year#month "Month FE" con "Constant" year#month#Dev_dummy "Month x Developed FE")
esttab using "Result_Table_4.csv", replace sfmt(%-8.0f %-8.4f) t(2) dep legend star(* 0.10 ** 0.05 *** 0.01) ///
		title(Table 4: Reversal and momentum profits across countries) stats(N r2_a, labels("N Obs" "Adj-R2")) indicate(`r(indicate_fe)') ///
		note("SE clustered by time")
